package com.xiaoban;

import org.junit.jupiter.api.Test;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

/**
 * @Title: SecurityPassword
 * @Author @小班哥
 * @Package com.xiaoban
 * @Date 2024/3/14 16:31
 * @description: 请描述一下这个类是干嘛的
 */
public class SecurityPassword {

    @Test
    public void testBCryptPasswordEncoder(){
        BCryptPasswordEncoder bCryptPasswordEncoder = new BCryptPasswordEncoder();
        String admin = bCryptPasswordEncoder.encode("123");
        System.out.println(admin);
        System.out.println(bCryptPasswordEncoder.matches("admin" , "$2a$10$OL3XCAIGoMCVXTIFI81Qke686En0uPK8j9Z3fTbWhU3yLp0z4uq6u"));
    }
}
